-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
perf(GraphQL): Part-4: Child auth queries are derived from auth filtered parents (GRAPHQL-854) #7111
Conversation
✔️ Deploy preview for dgraph-docs ready! 🔨 Explore the source changes: 4a00b50 🔍 Inspect the deploy logs: https://app.netlify.com/sites/dgraph-docs/deploys/5fd25bc7d62da400083f1e28 😎 Browse the preview: https://deploy-preview-7111--dgraph-docs.netlify.app |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also check if ordering at root with filter and auth works correctly in a separate PR and add an e2e test for that
Reviewed 4 of 4 files at r1.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @abhimanyusinghgaur and @MichaelJCompton)
graphql/resolve/query_rewriter.go, line 969 at r1 (raw file):
// This query aggregates all filters and auth rules and is used by root query to filter // the final nodes for the current level. // User6 as var(func: uid(User2), orderasc: ...) @filter((eq(User.username, "User1") AND (...Auth Filter))))
check if orderasc is applied here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 3 of 4 files reviewed, 1 unresolved discussion (waiting on @MichaelJCompton and @pawanrawal)
graphql/resolve/query_rewriter.go, line 969 at r1 (raw file):
Previously, pawanrawal (Pawan Rawal) wrote…
check if orderasc is applied here
Done.
This PR optimizes auth query rewriting by deriving child auth queries from auth filtered parents instead of all possible parents. This reduces the number of
touched_uids
at deep levels. This performance benefit comes into effect when there are a lot of nested levels in auth rules.This change is